# Contributor: psykose <alice@ayaya.ev>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=maui
pkgname=fiery
pkgver=2.0.0
pkgrel=0
pkgdesc="KDE Convergent web browser"
url="https://invent.kde.org/maui/maui-fiery"
# all other arches blocked by qt5-qtwebengine
arch="x86_64 x86 aarch64"
license="LicenseRef-KDE-Accepted-LGPL"
depends="mauikit-filebrowsing"
makedepends="
	cmake
	extra-cmake-modules
	kcoreaddons-dev
	ki18n-dev
	mauikit-dev
	mauikit-filebrowsing-dev
	qt6-qtbase-dev
	qt6-qttools-dev
	qt6-qtwebengine-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/maui/maui-fiery.git"
source="https://download.kde.org/stable/maui/fiery/$pkgver/maui-fiery-$pkgver.tar.xz"
options="!check" # no tests
builddir="$srcdir/maui-$pkgname-$pkgver"

provides="kde-sol=$pkgver-r$pkgrel kde-fiery=$pkgver-r$pkgrel"
replaces="kde-sol kde-fiery"

build() {
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
1d0c093d73b40344ae2240d53b1daac10e67c08b8ef1819f5f4f54ad99171669ef2a38e13e81c966471f4b89c896e462293ba0895f22ac3a04ac061c282b52ec  maui-fiery-2.0.0.tar.xz
"
